<#assign pg=JspTaglibs['http://jsptags.com/tags/navigation/pager']/>
<#assign ctx = request.contextPath />
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1 ,minimum-scale=1.0 ,maximum-scale=1.0" user-scalable=no>
		<title>历史订单</title>
	</head>
	<link rel="stylesheet" href="${ctx}/assets/css/jquery.mobile-1.4.2.min.css">
	<link rel="stylesheet" href="${ctx}/assets/css/blue.css">
	<script src="${ctx}/assets/js/jquery-1.9.1.min.js" type="text/javascript"></script>
	<script src="${ctx}/assets/js/jquery.mobile-1.4.2.min.js" type="text/javascript"></script>
	
	<body>
		<div data-role="page" id="menu">
		   <#if orders?? && orders.content?? && (orders.content?size>0)>
		   		   <div data-role="header">
				      <h1>历史订单</h1>
				   </div><!-- /header -->
				   <p></p>
		   		<#list orders.content as order>
		   			<div class="ui-corner-all custom-corners">
					  <div class="ui-bar ui-bar-a">
					    <h3>${order.orderBookAddress?if_exists}</h3>
					  </div>
					  <div class="ui-body ui-body-a">
					    <p>订单号：${order.orderNumber}</p>
					    <p>下单时间：${order.orderCreatedTime?datetime}</p>
					    <p>
					    	<#if order.orderDriverName??>
					    		服务人员：${order.orderDriverName}(${order.orderDriverPhone?if_exists})
					    	<#else>
					    		服务人员：暂无
					    	</#if>
					    </p>
					    <p>
							<#if order.orderStatus==0>
								当前状态：新单
							<#elseif order.orderStatus==1>
								当前状态：已派单
							<#elseif order.orderStatus==2>
								当前状态：服务中
							<#elseif order.orderStatus==3>
								当前状态：已完成
							<#elseif order.orderStatus==4>
								当前状态：已派单
							<#elseif order.orderStatus==5>
								当前状态：已销单
							<#elseif order.orderStatus==6>
								当前状态：已完成
							</#if>
						</p>
					  </div>
					</div>
					<p></p>
		   		</#list>
		   		<#if orders.totalElements??>
					<div data-role="navbar">
						<ul>
						<@pg.pager items=orders.totalElements?number maxPageItems=10 export="currentPageNumber=pageNumber" url="${ctx}/wx/v1/historyOrder">
							<@pg.param name="phone" value="${phone}"/>
							<@pg.index>
								<@pg.prev>
									<li><a href="${pageUrl}" class="">上一页</a></li>
								</@pg.prev>
								<@pg.next>
									<li><a href="${pageUrl}" class="">下一页</a></li>
								</@pg.next>
							</@pg.index>
						</@pg.pager>
						</ul>
					</div><!-- /navbar -->
				</#if>
		   <#else>
		   		<div data-role="header">
			      <h1>历史订单</h1>
			    </div><!-- /header -->
			    <div data-role="footer">
			      <h4>暂无订单信息</h4>
			    </div><!-- /footer -->
		   </#if>
		</div><!-- /page -->
	</body>
	
	<script type="text/javascript">
		
	</script>
</html>
